package se.webbzon.boltzmann.game.sequence.condition;

import se.webbzon.boltzmann.game.object.player.AbstractPlayerCharacter;
import se.webbzon.boltzmann.game.sequence.Sequence;
import se.webbzon.boltzmann.player.BoltzmannCharacter;
import se.webbzon.boltzmann.player.Player;

public class IsBoltzmann extends ConditionSequenceNode {
	
	/*============================================================
	Constructors
	============================================================*/

	public IsBoltzmann(Sequence sequence) {
		super(sequence,null,null);
	}

	/*============================================================
	Public Methods
	============================================================*/
	
	@Override public boolean isTrue() {
		final AbstractPlayerCharacter character = 
				(AbstractPlayerCharacter) getSequence().getBinding(this);
		final Player player = character.getPlayer();
		return (player.getCharacter() instanceof BoltzmannCharacter);
	}

}
